/*
 * Powered By [fdlm]
 * Web Site: http://www.fdlm.cn
 * Since 2014 - 2015
 */

package com.sjyy.accountdoctor.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import cn.org.rapid_framework.util.DateConvertUtils;

import java.util.*;

import com.sjyy.accountdoctor.model.*;
import com.sjyy.accountdoctor.service.*;
import com.sjyy.accountdoctor.vo.query.*;

import javacommon.base.*;
import javacommon.util.*;
import javacommon.page.Page;

/**
 * @author cty email:caotianye@fdlm.cn
 * @version 1.0
 * @since 1.0
 */


public class AccountDoctor extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "AccountDoctor";
	public static final String ALIAS_DOCTOR_ID = "doctorId";
	public static final String ALIAS_ACCOUNT_ID = "accountId";
	public static final String ALIAS_HOSPITAL_ID = "hospitalId";
	public static final String ALIAS_DEPARTMENT_ID = "departmentId";
	public static final String ALIAS_ICON_URL = "iconUrl";
	public static final String ALIAS_NAME = "name";
	public static final String ALIAS_TEL = "tel";
	public static final String ALIAS_SUMMARY = "summary";
	public static final String ALIAS_MOTTO = "motto";
	public static final String ALIAS_MEDICAL_BACKGROUND = "medicalBackground";
	public static final String ALIAS_QUALIFICATION = "0:专家 1:主任 2:副主任 3:主治 4:实习生";
	public static final String ALIAS_CERTIFICATION = "0:未认证 1:已认证";
	
	//date formats
	
	//columns START
    /** doctorId       db_column: doctor_id */	
	
	private java.lang.Integer doctorId;
    /** accountId       db_column: account_id */	
	@NotNull 
	private java.lang.Integer accountId;
    /** hospitalId       db_column: hospital_id */	
	@NotNull 
	private java.lang.Integer hospitalId;
    /** departmentId       db_column: department_id */	
	@NotNull 
	private java.lang.Integer departmentId;
    /** iconUrl       db_column: icon_url */	
	@Length(max=128)
	private java.lang.String iconUrl;
    /** name       db_column: name */	
	@NotBlank @Length(max=32)
	private java.lang.String name;
    /** tel       db_column: tel */	
	@Length(max=11)
	private java.lang.String tel;
    /** summary       db_column: summary */	
	@Length(max=256)
	private java.lang.String summary;
    /** motto       db_column: motto */	
	@Length(max=64)
	private java.lang.String motto;
    /** medicalBackground       db_column: medical_background */	
	@Length(max=256)
	private java.lang.String medicalBackground;
    /** 0:专家 1:主任 2:副主任 3:主治 4:实习生       db_column: qualification */	
	@NotNull 
	private java.lang.Integer qualification;
    /** 0:未认证 1:已认证       db_column: certification */	
	@NotNull 
	private java.lang.Integer certification;
	//columns END

	public AccountDoctor(){
	}

	public AccountDoctor(
		java.lang.Integer doctorId
	){
		this.doctorId = doctorId;
	}

	public void setDoctorId(java.lang.Integer value) {
		this.doctorId = value;
	}
	
	public java.lang.Integer getDoctorId() {
		return this.doctorId;
	}
	public void setAccountId(java.lang.Integer value) {
		this.accountId = value;
	}
	
	public java.lang.Integer getAccountId() {
		return this.accountId;
	}
	public void setHospitalId(java.lang.Integer value) {
		this.hospitalId = value;
	}
	
	public java.lang.Integer getHospitalId() {
		return this.hospitalId;
	}
	public void setDepartmentId(java.lang.Integer value) {
		this.departmentId = value;
	}
	
	public java.lang.Integer getDepartmentId() {
		return this.departmentId;
	}
	public void setIconUrl(java.lang.String value) {
		this.iconUrl = value;
	}
	
	public java.lang.String getIconUrl() {
		return this.iconUrl;
	}
	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	public void setTel(java.lang.String value) {
		this.tel = value;
	}
	
	public java.lang.String getTel() {
		return this.tel;
	}
	public void setSummary(java.lang.String value) {
		this.summary = value;
	}
	
	public java.lang.String getSummary() {
		return this.summary;
	}
	public void setMotto(java.lang.String value) {
		this.motto = value;
	}
	
	public java.lang.String getMotto() {
		return this.motto;
	}
	public void setMedicalBackground(java.lang.String value) {
		this.medicalBackground = value;
	}
	
	public java.lang.String getMedicalBackground() {
		return this.medicalBackground;
	}
	public void setQualification(java.lang.Integer value) {
		this.qualification = value;
	}
	
	public java.lang.Integer getQualification() {
		return this.qualification;
	}
	public void setCertification(java.lang.Integer value) {
		this.certification = value;
	}
	
	public java.lang.Integer getCertification() {
		return this.certification;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("DoctorId",getDoctorId())
			.append("AccountId",getAccountId())
			.append("HospitalId",getHospitalId())
			.append("DepartmentId",getDepartmentId())
			.append("IconUrl",getIconUrl())
			.append("Name",getName())
			.append("Tel",getTel())
			.append("Summary",getSummary())
			.append("Motto",getMotto())
			.append("MedicalBackground",getMedicalBackground())
			.append("Qualification",getQualification())
			.append("Certification",getCertification())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getDoctorId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof AccountDoctor == false) return false;
		if(this == obj) return true;
		AccountDoctor other = (AccountDoctor)obj;
		return new EqualsBuilder()
			.append(getDoctorId(),other.getDoctorId())
			.isEquals();
	}
}

